﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EmoneyWeiXinDAL;
using EmoneyWeiXinEntity;
using EmoneyWeiXinCommon;

namespace EmoneyWeiXinBLL
{
    public class ActivityDataBLL
    {



        //根据openId获取自己的积分数据，并获取前十的数据
        public static List<ActivityDataEntity> GetDataTop10(string openid, string activityName)
        {
            return ActivityDataDAL.GetDataTop10(openid, activityName);
        }

        public static ActivityDataEntity GetOne(string openid, string weixinId, string activityName)
        {
            return ActivityDataDAL.GetOne(openid, activityName);
        }


        public static void InsertActivityData(string openId, int jifen, string activityName, bool IShaveRedBag, double t_money, string nickName, string imgUrl)
        {
            ActivityDataDAL.InsertActivityData(openId, jifen, activityName, IShaveRedBag, t_money, nickName, imgUrl);
        }

        public static void LockRedBag(string openId, string activityName, out double t_money, out string result)
        {
            ActivityDataDAL.LockRedBag(openId, activityName, out t_money, out result);
        }

        //将红包状态改为已领取
        public static void UpadateRedBag2getted(string openId, string activityName, bool isSuccess, double sendMoney)
        {
            ActivityDataDAL.UpadateRedBag2getted(openId, activityName, isSuccess, sendMoney);
        }

        public static void AddActivityShareUrlRecord(string fromOpenId, string openId, string actName)
        {
            ActivityDataDAL.AddActivityShareUrlRecord(openId, fromOpenId, actName);
        }




    }
}
